/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.team.app.model;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;

/**
 *
 * @author donnv
 */
@Entity
@Table(name = "rentprice", catalog = "", schema = "", uniqueConstraints = {@UniqueConstraint(columnNames = {"vehicle_id"})})
public class Rentprice implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "ren_price_id")
    private Long renPriceId;
    @Column(name = "per_hour")
    private Long perHour;
    @Column(name = "per_day")
    private Long perDay;
    @Column(name = "per_week")
    private Long perWeek;
    @Column(name = "per_month")
    private Long perMonth;
    @Column(name = "per_quater")
    private Long perQuater;
    @Column(name = "km_limited_hour")
    private Long kmLimitedHour;
    @Column(name = "km_limited_day")
    private Long kmLimitedDay;
    @Column(name = "km_limited_week")
    private Long kmLimitedWeek;
    @Column(name = "km_limited_month")
    private Long kmLimitedMonth;
    @Column(name = "over_km_fee")
    private Long overKmFee;
    @Column(name = "created_date")
    @Temporal(TemporalType.TIMESTAMP)
    private Date createdDate;
    @Column(name = "updated_date")
    @Temporal(TemporalType.TIMESTAMP)
    private Date updatedDate;
    @Column(name = "is_status")
    private Long isStatus;
    @JoinColumn(name = "emp_id", referencedColumnName = "emp_id")
    @ManyToOne
    private Employee empId;
    @JoinColumn(name = "company_id", referencedColumnName = "company_id")
    @ManyToOne
    private Company companyId;
    @JoinColumn(name = "vehicle_id", referencedColumnName = "vehicle_id")
    @OneToOne
    private Vehicle vehicleId;

    public Rentprice() {
    }

    public Rentprice(Long renPriceId) {
        this.renPriceId = renPriceId;
    }

    public Long getRenPriceId() {
        return renPriceId;
    }

    public void setRenPriceId(Long renPriceId) {
        this.renPriceId = renPriceId;
    }

    public Long getPerHour() {
        return perHour;
    }

    public void setPerHour(Long perHour) {
        this.perHour = perHour;
    }

    public Long getPerDay() {
        return perDay;
    }

    public void setPerDay(Long perDay) {
        this.perDay = perDay;
    }

    public Long getPerWeek() {
        return perWeek;
    }

    public void setPerWeek(Long perWeek) {
        this.perWeek = perWeek;
    }

    public Long getPerMonth() {
        return perMonth;
    }

    public void setPerMonth(Long perMonth) {
        this.perMonth = perMonth;
    }

    public Long getPerQuater() {
        return perQuater;
    }

    public void setPerQuater(Long perQuater) {
        this.perQuater = perQuater;
    }

    public Long getKmLimitedHour() {
        return kmLimitedHour;
    }

    public void setKmLimitedHour(Long kmLimitedHour) {
        this.kmLimitedHour = kmLimitedHour;
    }

    public Long getKmLimitedDay() {
        return kmLimitedDay;
    }

    public void setKmLimitedDay(Long kmLimitedDay) {
        this.kmLimitedDay = kmLimitedDay;
    }

    public Long getKmLimitedWeek() {
        return kmLimitedWeek;
    }

    public void setKmLimitedWeek(Long kmLimitedWeek) {
        this.kmLimitedWeek = kmLimitedWeek;
    }

    public Long getKmLimitedMonth() {
        return kmLimitedMonth;
    }

    public void setKmLimitedMonth(Long kmLimitedMonth) {
        this.kmLimitedMonth = kmLimitedMonth;
    }

    public Long getOverKmFee() {
        return overKmFee;
    }

    public void setOverKmFee(Long overKmFee) {
        this.overKmFee = overKmFee;
    }

    public Date getCreatedDate() {
        return createdDate;
    }

    public void setCreatedDate(Date createdDate) {
        this.createdDate = createdDate;
    }

    public Date getUpdatedDate() {
        return updatedDate;
    }

    public void setUpdatedDate(Date updatedDate) {
        this.updatedDate = updatedDate;
    }

    public Long getIsStatus() {
        return isStatus;
    }

    public void setIsStatus(Long isStatus) {
        this.isStatus = isStatus;
    }

    public Employee getEmpId() {
        return empId;
    }

    public void setEmpId(Employee empId) {
        this.empId = empId;
    }

    public Company getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Company companyId) {
        this.companyId = companyId;
    }

    public Vehicle getVehicleId() {
        return vehicleId;
    }

    public void setVehicleId(Vehicle vehicleId) {
        this.vehicleId = vehicleId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (renPriceId != null ? renPriceId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Rentprice)) {
            return false;
        }
        Rentprice other = (Rentprice) object;
        if ((this.renPriceId == null && other.renPriceId != null) || (this.renPriceId != null && !this.renPriceId.equals(other.renPriceId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.team.app.model.Rentprice[ renPriceId=" + renPriceId + " ]";
    }
    
}
